package org.example.authservice.utils;

/**
 * @author lj20050120
 */
public class UserContextHolder {
    private static final ThreadLocal<String> userContext = new ThreadLocal<>();

    public static void setUser(String username) {
        userContext.set(username);
    }

    public static String getUser() {
        return userContext.get();
    }

    public static void clear() {
        userContext.remove();
    }
}